package com.monlyu.action.deviceuse;

import com.monlyu.action.PageAction;
import com.monlyu.bean.Pages;
import com.monlyu.bo.DeviceuseBo;
import com.monlyu.model.QueryDeviceUseModel;
import com.monlyu.vo.DeviceUse;

/**
 * @author SongJun
 * @since 2010-2-23
 * @description 设备使用信息列表
 */
public class ListDeviceuseAction extends PageAction {
	private DeviceuseBo deviceuseBo;
	private Pages<DeviceUse> dulists;
	private QueryDeviceUseModel qdum;

	public QueryDeviceUseModel getQdum() {
		return qdum;
	}

	public void setQdum(QueryDeviceUseModel qdum) {
		this.qdum = qdum;
	}

	public Pages<DeviceUse> getDulists() {
		return dulists;
	}

	public void setDulists(Pages<DeviceUse> dulists) {
		this.dulists = dulists;
	}

	public void setDeviceuseBo(DeviceuseBo deviceuseBo) {
		this.deviceuseBo = deviceuseBo;
	}

	@Override
	public String execute() throws Exception {
		dulists = deviceuseBo.getDeviceuseList(getDefPage());
		return view("listDeviceuse.jsp");
	}

	public String toQuery() {
		if (qdum != null) {
			dulists = deviceuseBo.getQueryDeviceuse(qdum, getDefPage());
		}
		return view("listDeviceuse.jsp");
	}

}
